package org.apache.dolphinscheduler.api.service;

import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.Role;
import org.apache.dolphinscheduler.dao.entity.User;

import java.util.List;
import java.util.Map;

public interface RoleService {

    Result queryRoleList(User loginUser, String searchVal, Integer pageNo, Integer pageSize);
    Result listAll();
    Result findRoleUser(Integer id);
    Result findRole(Integer id);
    Result getPermissions(Integer id);
    Map<String, Object> auth(User loginUser, Integer roleId, List<Integer> permissionIds);
    Map<String, Object> createRole(User loginUser, Role role);
    Map<String, Object> updateRole(User loginUser, Role role);
    Map<String, Object> deleteRole(User loginUser, Integer id);

    Map<String, Object> updateRoleUser(User loginUser, String userIds, Integer roleId);
}
